#ifndef MAINWIDGET_H
#define MAINWIDGET_H

#include <QWidget>
#include <QProgressBar>
#include "shelf.h"
#include "reader.h"
#include "writer.h"
#include <QThreadPool>
#include <QSpinBox>

class MainWidget : public QWidget
{
    Q_OBJECT
    QProgressBar* booksCount;
    QProgressBar* activePeopleCount;
    QProgressBar* passivePeopleCount;

    QSpinBox* readIntervalBox;
    QSpinBox* writeIntervalBox;

    size_t readersCount;
    size_t writersCount;
    size_t readInterval;
    size_t writeInterval;
    size_t maxBooksCount;

    QThreadPool* pool;
public:
    explicit MainWidget(QWidget *parent = 0);
signals:

public slots:
    void startWork();
    void changePeopleCount(int);
    void changeBooksCount(int);
    void changeReadInterval(int);
    void changeWriteInterval(int);
};

#endif // MAINWIDGET_H
